package data;

import java.io.Serializable;

import com.google.appengine.api.datastore.Key;

import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

@PersistenceCapable
public class Vote implements Serializable{



	/**
	 * 
	 */
	@Persistent
	private static final long serialVersionUID = -4513949756810249152L;

	public Vote(Lecture lecture, int vote) {
		this.lecture = lecture; 
		this.vote = vote;
	}

	@PrimaryKey
	@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
	private Key key;

	@Persistent
	private int vote;

	@Persistent
	Lecture lecture;

	public String toString() {
		return "vote: " + vote + " " + lecture;
	}

	public int getVote() {
		return vote;
	}

	public void setVote(int vote) {
		this.vote = vote;
	}

	public Lecture getLecture() {
		return lecture;
	}

	public void setLecture(Lecture lecture) {
		this.lecture = lecture;
	}

	public Key getKey() {
		return key;
	}

	
	
}
